
<?php
/*
 * @Descripttion:  validator 中的rule参数
 * @version: v1
 * @Author: Terriv
 * @Date: 2021-02-05 23:25:16
 * @LastEditors: Terry
 * @LastEditTime: 2024-10-19 11:35:21
 */
$prjCode = $_SERVER["HTTP_PUUID"] ?? '';
return [
    'admin'=>[
        'gas'=>[
            'getlist'=>[
                'page|页数'=>"require|number",
                'limit|每页显示总行数'=>"number|between:1,30",
            ], 
            'create'=>[
                'name|设备名称'  => 'require|max:100|unique:confinedSpace_gas,isDelete=0&projectCode='.$prjCode.'&name',
                'deviceId|设备编码'=>"require|max:50|unique:confinedSpace_gas,isDelete=0&deviceId",
                'integratorCorpCode|集成商'=>"require|max:100",
                'description|备注'=>"max:255",
            ], 
            'update'=>[
                'uuid|设备唯一码'=>"require|max:200",
                'name|设备名称'=>"require|max:200",
                'integratorCorpCode|集成商'=>"require|max:100",
                'corpCode|所属企业'=>"require|max:100",
                'description|备注'=>"max:255",
            ], 
            'destroy'=>[
                'uuid|设备唯一码'=>"require|max:50",
            ], 
            'detail'=>[
                'page|页数'=>"require|number",
                'limit|每页显示总行数'=>"number|between:1,30",
                'uuid|设备唯一码'=>"require|max:50",
                'date|日期范围'=>"array",
            ], 
        ],
        'camera'=>[
            'getlist'=>[
                'page|页数'=>"require|number",
                'limit|每页显示总行数'=>"require|number|between:1,30",
            ],
            'getcloudlist'=>[
                'uuid|设备编码'=>"require",
                'date|日期'=>"require",
                'page|页数'=>"require|number",
                'limit|每页显示总行数'=>"number|between:1,30",
            ],
            'getclouddate'=>[
                'uuid|设备编码'=>"require",
            ],
            'create'=>[
                'type|摄像头类型'=>'require|max:2',
                'module|所属板块'=>'require|max:2',
                'configUuid|账号配置'=>'require|max:32',
                'number|序列号'=>'require',
                'code|验证码'=>'requireIf:type,01|max:50',
                'remark|备注'=>'max:255',
            ],
            'update'=>[
                'name|名称'=>'require|max:50',
                'uuid|设备唯一码'=>'require',
                'remark|备注'=>'max:255',
                'module|所属板块'=>'require|max:2',
                'configUuid|账号配置'=>'require|max:32',
                'type|摄像头类型'=>'require|max:2',
            ],
            'getcameradetail'=>[
                'uuid|设备唯一码'=>'require',
            ],
            'destroy'=>[
                'uuid|设备唯一码'=>'require',
            ],
            'getchanneldata'=>[
                'uuid|设备唯一码'=>'require',
            ],
            'updatesetting'=>[
                'appKey'=>'require|max:64',
                'secret'=>'require|max:64'
            ],
        ],
        'video'=>[
            'update'=>[
                'playerList'=>'require|array',
                'screenCount'=>'require|number',
            ]
        ],
        'config'=>[
            'getlist'=>[
                'page|页数'=>"require|number",
                'limit|每页显示总行数'=>"number|between:1,30",
            ],
            'create'=>[
                'appKey|appKey'=>'require',
                'secret|secret'=>'require',
                'name|账号名称'=>'require|max:10|unique:confinedSpace_projectCameraConfig,isDelete=0&projectCode='.$prjCode.'&name',
                'remark|备注'=>'max:50',
            ],
            'udpate'=>[
                'uuid|账号唯一码'=>'require|max:32',
                'name|账号名称'=>'require|max:10',
                'remark|备注'=>'max:50',
            ],
            'destroy'=>[
                'uuid|设备唯一码'=>'require|max:32',
            ],
        ],
    ],
    'user'=>[
        
    ]
];
